import React from "react";
import { Form } from "antd";
import AutoCompleteAPP from "../../../components/AutoCompleteAPP";
import ControlLevelSelect from "../../../components/ControlLevelSelect";

import "./style.scss";

@Form.create()
class SingleForm extends React.Component {
    render() {
        const { getFieldDecorator } = this.props.form;
        return (
            <div className="PMW-add-form">
                <Form>
                    <Form.Item label="APP信息">
                        {getFieldDecorator("app", {
                            rules: [
                                {
                                    required: true,
                                    message: "请选择APP"
                                }
                            ]
                        })(<AutoCompleteAPP />)}
                    </Form.Item>
                    <Form.Item label="管控等级">
                        {getFieldDecorator("controlLevel", {
                            rules: [
                                {
                                    required: true,
                                    message: "请选择管控等级"
                                }
                            ]
                        })(<ControlLevelSelect style={{ width: 200 }} />)}
                    </Form.Item>
                </Form>
            </div>
        );
    }
}

export default SingleForm;
